<?php
/**
 * 策略模式
 */

abstract class Strategy
{
    abstract function goSchool();
}

class Run extends Strategy
{
    public function goSchool()
    {
        // TODO: Implement goSchool() method.
    }
}

class Subway extends Strategy
{
    public function goSchool()
    {
        // TODO: Implement goSchool() method.
    }
}

class Bike extends Strategy
{
    public function goSchool()
    {
        // TODO: Implement goSchool() method.
    }
}

class Context
{
    public function goSchool(Strategy $object)
    {
        $object->goSchool();
    }
}